<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/tld/authority.tld" prefix="authority" %>
<%@ taglib uri="/tld/token.tld" prefix="token" %>
<div class="pop-background">
    <div class="col-md-5">
        <div class="popup popup5 popup-small x-4-move">
            <div class="panel-heading">
                <div class="panel-btns">
                    <a class="panel-close btn-4-hide">×</a>
                </div>
                <h3 class="panel-title">${empty phase.id ? '新增' : '修改'}</h3>
            </div>
            <div class="panel-add-to">
                <div class="row">
                    <form>
                        <token:token/>
                        <input type="hidden" name="id" value="${phase.id}">
                        <div class="panel-body panel-body-ws panel-body-h">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">
                                        <em class="color-red btian">*</em>档次名称：
                                    </label>

                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="name" value="${phase.name}">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">
                                        <em class="color-red btian">*</em>档次编码：
                                    </label>

                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="identifier"
                                               value="${phase.identifier}">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">
                                        <em class="color-red btian">*</em>一级类别：
                                    </label>

                                    <div class="col-sm-6">
                                        <div class="select-container select">
                                            <select class="select select-offscreen categoryLv1">
                                                <option value="">-请选择-</option>
                                                <c:forEach items="${categoryLv1List}" var="item">
                                                    <option value="${item.id}" ${item.id == categoryLv1Id ? 'selected' : ''}>${item.name}</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">
                                        <em class="color-red btian">*</em>二级类别：
                                    </label>

                                    <div class="col-sm-6">
                                        <div class="select-container select">
                                            <select class="select select-offscreen categoryLv2" name="categoryId">
                                                <option value="">-请选择-</option>
                                                <c:forEach items="${categoryLv2List}" var="item">
                                                    <option value="${item.id}" ${item.id == phase.categoryId ? 'selected' : ''}>${item.name}</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">排序：</label>

                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="seq" value="${phase.seq}">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">备注：</label>

                                    <div class="col-sm-6">
                                        <textarea name="remark" class="form-control textarea">${phase.remark}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="btn-group2-s">
                    <div class="panel-body panel-body2">
                        <div class="btn-group2 left">
                            <authority:authority url="/phase/add,/phase/modify">
                                <button type="button" class="btn btn-primary btn-4-save">保存</button>
                            </authority:authority>
                            <button type="button" class="btn btn-default btn-4-hide">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="js/dictionary/phase-edit.js"></script>
</div>